package com.arvato.minipro.bean.bean_vo.mall;

import com.arvato.common.util.ContantFinalUtil;

/**
 * 
 * @author: smallking
 * 
 * @Descibe:返给前台json对应的实体
 * 
 * @Date: 2018年4月24日  下午2:58:52
 */
public class CommodityImgVo {
	/**
	 * 主键ID
	 */
    private String imgId;
    /**
     * 
     */
    private String commodityId;
    /**
     * 图片名称
     */
    private String imgName;
    /**
     * 图片大小
     */
    private Integer imgSize;
    /**
     * 图片类型
     */
    private String imgType;
    /**
     * 图片存储在服务器上的路径
     */
    private String imgPath;
    /**
     * 在浏览器的预览路径
     */
    @SuppressWarnings("unused")
	private String imgViewPath;
    /**
     * 排序码
     */
    private Integer sortCode;
    
    public String getImgId() {
        return imgId;
    }

    public void setImgId(String imgId) {
        this.imgId = imgId == null ? null : imgId.trim();
    }

    public String getCommodityId() {
        return commodityId;
    }

    public void setCommodityId(String commodityId) {
        this.commodityId = commodityId == null ? null : commodityId.trim();
    }

    public String getImgName() {
        return imgName;
    }

    public void setImgName(String imgName) {
        this.imgName = imgName == null ? null : imgName.trim();
    }

    public Integer getImgSize() {
        return imgSize;
    }

    public void setImgSize(Integer imgSize) {
        this.imgSize = imgSize;
    }

    public String getImgType() {
        return imgType;
    }

    public void setImgType(String imgType) {
        this.imgType = imgType == null ? null : imgType.trim();
    }

    public String getImgPath() {
        return imgPath;
    }

    public void setImgPath(String imgPath) {
        this.imgPath = imgPath == null ? null : imgPath.trim();
    }

	public String getImgViewPath() {
		try {
			return ContantFinalUtil.IMG_PATH + "?fileName=" + imgPath;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}

	public void setImgViewPath(String imgViewPath) {
		this.imgViewPath = imgViewPath;
	}

	public Integer getSortCode() {
		return sortCode;
	}

	public void setSortCode(Integer sortCode) {
		this.sortCode = sortCode;
	}
	
}